package com.sunrise.generico.entidade;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import lombok.Getter;
import lombok.Setter;

import org.hibernate.validator.constraints.NotEmpty;

import com.sunrise.generico.entidade.iface.EntidadeManter;

@Entity
@Table(name = "setor")
public class Setor implements EntidadeManter {

	
	/**
	 * 
	 */
	private static final long serialVersionUID = -271884223174826918L;
	
	@Id
	@SequenceGenerator(name="pk_sequence",sequenceName="setor_id_seq", allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="pk_sequence")
	@javax.persistence.Column
	@Getter @Setter
	private Long id;
	
	@NotEmpty( message="{setorObrigatorio}")
	@Column(name = "nome", length = 60, nullable = false, unique = true)
	@Getter @Setter
	private String nome;
	
	@Column(name = "ativo")
	@Getter @Setter
	private Boolean ativo;
	
}
